/*******************************************************************************
*  file    : main.cpp
*  created : 22.07.2013
*  author  : 
*******************************************************************************/

#include "srvapplication.hpp"
#include "backupserver.hpp"
#include <QScopedPointer>
#include <QTimer>
#include <QDebug>

const QString SRV_USAGE = "";

int main(int argc, char *argv[])
{
    int appRes = 0;
    try
    {
        QCoreApplication::setApplicationName ("backuper");
        QCoreApplication::setOrganizationName("Slyshyk" );

        SrvApplication a(argc, argv);
        qDebug() << "Backup server. Ver 0.0";

        QScopedPointer<BackupServer> bk_srv(new BackupServer);
        QTimer::singleShot(0,bk_srv.data(), SLOT(start()) );
        appRes = a.exec();
    }
    catch(...)
    {
        appRes = 0x666;
    }

    return appRes;
}
